<style type="text/css" scoped="scoped">
    .webNodeTree {
    }

    .webNodeTree [class^="icon-"] {
        margin-left: 5px;
        font-size: 0.8em;
    }

    .webNodeTree .icon-close {
        display: none;
        color: #FF6347;
    }

    .webNodeTree .webNodeName {
        cursor: pointer;
        line-height: 20px;
    }

    .webNodeTree .webNodeName span {
        margin-left: 0px;
        font-size: 1.1em;
    }

    .webNodeTree .webNodeName .created {
        margin-left: 3px;
        padding: 1px 4px;
        background-color: #79c9ec;
        color: #848078;
        font-size: 0.8em;
        border-radius: 10px;;
    }
</style>
<script type="text/javascript">
    $(document).ready(function (e) {
        var webNodeTree = $('.webNodeTree').jTree();
        webNodeTree.showAll(0);
        $('.webNodeTree .jentry').each(function (index, element) {
            var id = $(this).attr('id');
            if ($('.webNodeTree [pid=' + id + ']').length == 0 && $(this).attr('pid') != 0)
                $(this).find('.icon-close').show();
        });
    });
    function webNodeRemove(id) {
        LC.S.remove([{name: 'id', value: id}], LC.S.fleshTree);
    }
</script>
<div class="webNodeTree">
    <div id="webNode_0" pid="">
        <span class="webNodeName" title="点击添加根栏目" onClick="LC.S.addChild('')">
            <span class="icon-libreoffice"></span>
            <span class="name">栏目管理</span>
        </span>
        <span class="icon-libreoffice" title="点击添加根栏目" onClick="LC.S.add([])"></span>
    </div>
<#list webNodes as m>
    <div id="${m._id}" pid="${m.parentId!"webNode_0"}">
        <span class="webNodeName" title="${m.notes!"点击查看详情"}" onClick="LC.S.detail('${m._id}')">
            <span class="icon-libreoffice"></span>
            <span class="name">${m.name}</span>
            <span class="created">${m.created?date}</span>
        </span>
        <span class="icon-libreoffice" title="添加子栏目" onClick="LC.S.addChild('${m._id}')"></span>
        <span class="icon-close" title="删除栏目" onClick="webNodeRemove('${m._id}')"></span>
    </div>
</#list>
</div>